#include<bits/stdc++.h>
using namespace std;
int n;
int main()
{
	cin >> n;
	int dp[n + 1][n + 1] = {0};
    dp[1][1] = 1, dp[2][1] = 1, dp[2][2] = 1;
    for (int i = 2; i <= n; i ++)
    {
        for (int j = 1; j <= i; j ++)
        {
            dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j];
        }
    }
    for (int i = 1; i <= n; i ++)
	{
		for (int j = 1; j <= n; j ++)
		{
			cout << dp[i][j] << " ";
		}
		cout << endl;
	}    	
	return 0;
}
